{	Problem: http://codeforces.ru/problemset/problem/92/D
	Verdict: Accepted
}
uses
        SysUtils, Math;

var
        i,n,l,r,c,x:longint;
        a,m:array[0..100010] of longint;

begin
read(n);
for i:=1 to n do
        read(a[i]);
m[n+1]:=maxlongint;
a[n+1]:=maxlongint;
for i:=n downto 1 do
        m[i]:=min(a[i],m[i+1]);
for i:=1 to n do begin
        if a[i]=m[i] then begin
                write('-1 ');
                continue;
        end;
        l:=i;
        r:=n+1;
        c:=(l+r) shr 1;
        while r-l>1 do begin
                c:=(l+r) shr 1;
                if m[c]<a[i] then l:=c else r:=c;
        end;
        x:=i;
        if a[r]<a[i] then x:=r else
        if a[c]<a[i] then x:=c else
        if a[(l+r) shr 1]<a[i] then x:=(l+r) shr 1 else
        if a[l]<a[i] then x:=l;
        write(x-i-1,' ');
end;
end.